#include <iostream>
using namespace std;
//结构体指针

struct Student {
    string name;
    int age;

    void toString() {
        cout << name << endl;
    }
};


int main() {
    Student stu = {"xiao", 18};
    Student *stuPr = &stu;
    //输出结构体里面的内容
    cout << (*stuPr).name << endl;
    //一般这样写    
    cout << stuPr->name << endl;
    
    return 0; 
}